from selenium import webdriver
from selenium.webdriver.common.by import By
import time



web_driver = webdriver.Chrome()  # 创建web司机
web_driver.get('https://www.douban.com')  # 司机访问百度


a = web_driver.find_element_by_id("username")  # 根据 id='kw' 找到百度输入框, 返回一个对象
a.send_keys('helloaworld')
# html = web_driver.page_source
# print(html)